﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdPsPlotStyleData : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdPsPlotStyleData(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdPsPlotStyleData obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdPsPlotStyleData()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdPsPlotStyleData(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdPsPlotStyleData() : this(GlobalsPINVOKE.new_OdPsPlotStyleData(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static OdPsPlotStyleData kDefault
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdPsPlotStyleData_kDefault_get();
				OdPsPlotStyleData result = (intPtr == IntPtr.Zero) ? null : new OdPsPlotStyleData(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
		}

		public bool IsEqual(OdPsPlotStyleData other)
		{
			bool result = GlobalsPINVOKE.OdPsPlotStyleData_IsEqual(this.swigCPtr, OdPsPlotStyleData.getCPtr(other));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdPsPlotStyleData other)
		{
			bool result = GlobalsPINVOKE.OdPsPlotStyleData_IsNotEqual(this.swigCPtr, OdPsPlotStyleData.getCPtr(other));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdCmEntityColor color()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdPsPlotStyleData_color(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public short colorPolicy()
		{
			short result = GlobalsPINVOKE.OdPsPlotStyleData_colorPolicy(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public short physicalPenNumber()
		{
			short result = GlobalsPINVOKE.OdPsPlotStyleData_physicalPenNumber(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public short virtualPenNumber()
		{
			short result = GlobalsPINVOKE.OdPsPlotStyleData_virtualPenNumber(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int screening()
		{
			int result = GlobalsPINVOKE.OdPsPlotStyleData_screening(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double linePatternSize()
		{
			double result = GlobalsPINVOKE.OdPsPlotStyleData_linePatternSize(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public LineType linetype()
		{
			LineType result = (LineType)GlobalsPINVOKE.OdPsPlotStyleData_linetype(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isAdaptiveLinetype()
		{
			bool result = GlobalsPINVOKE.OdPsPlotStyleData_isAdaptiveLinetype(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isGrayScaleOn()
		{
			bool result = GlobalsPINVOKE.OdPsPlotStyleData_isGrayScaleOn(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isDitherOn()
		{
			bool result = GlobalsPINVOKE.OdPsPlotStyleData_isDitherOn(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double lineweight()
		{
			double result = GlobalsPINVOKE.OdPsPlotStyleData_lineweight(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public FillStyle fillStyle()
		{
			FillStyle result = (FillStyle)GlobalsPINVOKE.OdPsPlotStyleData_fillStyle(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public LineEndStyle endStyle()
		{
			LineEndStyle result = (LineEndStyle)GlobalsPINVOKE.OdPsPlotStyleData_endStyle(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public LineJoinStyle joinStyle()
		{
			LineJoinStyle result = (LineJoinStyle)GlobalsPINVOKE.OdPsPlotStyleData_joinStyle(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColor(OdCmEntityColor color)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setColor(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setColorPolicy(short colorPolicy)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setColorPolicy(this.swigCPtr, colorPolicy);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setPhysicalPenNumber(short physicalPenNumber)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setPhysicalPenNumber(this.swigCPtr, physicalPenNumber);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setVirtualPenNumber(short virtualPenNumber)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setVirtualPenNumber(this.swigCPtr, virtualPenNumber);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setScreening(int screening)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setScreening(this.swigCPtr, screening);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLinePatternSize(double linePatternSize)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setLinePatternSize(this.swigCPtr, linePatternSize);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLinetype(LineType linetype)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setLinetype(this.swigCPtr, (int)linetype);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setAdaptiveLinetype(bool adaptiveLinetype)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setAdaptiveLinetype(this.swigCPtr, adaptiveLinetype);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setGrayScaleOn(bool grayScaleOn)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setGrayScaleOn(this.swigCPtr, grayScaleOn);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setDitherOn(bool ditherOn)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setDitherOn(this.swigCPtr, ditherOn);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLineweight(double lineweight)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setLineweight(this.swigCPtr, lineweight);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setFillStyle(FillStyle fillStyle)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setFillStyle(this.swigCPtr, (int)fillStyle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setEndStyle(LineEndStyle lineEndStyle)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setEndStyle(this.swigCPtr, (int)lineEndStyle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setJoinStyle(LineJoinStyle lineJoinStyle)
		{
			GlobalsPINVOKE.OdPsPlotStyleData_setJoinStyle(this.swigCPtr, (int)lineJoinStyle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;
	}
}
